﻿<!DOCTYPE html>
<html ng-app="demo">
<head>
    <title>Example</title>
    <script src="angular.js"></script>
    <link href="bootstrap.css" rel="stylesheet" />
    <link href="bootstrap-theme.css" rel="stylesheet" />
    <script type="text/javascript">

        var myApp = angular.module("demo", []);

        myApp.controller("demoCtrl", function ($scope, $http) {
            var promise = $http.get("todo.json");
            promise.success(function (data) {
                $scope.todos = data;
            });
        });

    </script>
</head>
<body ng-controller="demoCtrl">
    <div class="panel">
        <h1>To Do</h1>
        <table class="table">
            <tr><td>Action</td><td>Done</td></tr>
            <tr ng-repeat="item in todos">
                <td>{{item.action}}</td>
                <td>{{item.done}}</td>
            </tr>
        </table>
    </div>
</body>
</html>
